<%@ page language="java" import="java.util.*,com.king.cms.common.*" pageEncoding="utf-8"%>
<%@ include file="/hotel/include/css.jsp"%><%-- /*包含css样式表*/ --%>
<%@ include file="date.jsp"%><%-- /*包含css样式表*/ --%>
<% 
String action = (String)request.getAttribute("action");
Map map = (Map)request.getAttribute("dataMap");
 if(null == map)
       map = new HashMap(); 
String[] clientStr = (String[])request.getAttribute("clientStr");
String type = (String)request.getAttribute("type");
String nameStr = (String)request.getAttribute("nameStr");
String idStr = (String)request.getAttribute("idStr");
String contentStr = (String)request.getAttribute("contentStr");
 String userStr = (String)request.getAttribute("userStr");
  String areaStr = (String)request.getAttribute("areaStr");
 int pow=(PowerParameter.save | PowerParameter.cls | PowerParameter.list|PowerParameter.inquiry);
  String place = (String)request.getAttribute("placeselect");
   String isrefresh = (String)request.getAttribute("isrefresh");
%> 
<html>
<head>
<title> </title>
<meta  http-equiv="Expires"     CONTENT="0">           
<meta  http-equiv="Cache-Control"     CONTENT="no-cache">           
<meta  http-equiv="Pragma"     CONTENT="no-cache"> 
<script language="JavaScript" src="<%=path%>/js/generalcheck.js"></script>  
<script language="javascript">
  function changetype(){
     form1.action="<%=path%>/pubinfo.do?action=add&type="+form1.hytzTag.value;
     form1.submit();
 }
  function saveData(){ 
    if(checkData()){
     form1.action="<%=path%>/pubinfo.do?action=save&type=<%=type%>";
     form1.submit();
       }
 }
  function ki_save(){ 
	 saveData();
	} 
 function checkData(){ 
      if(!validateNotNull(document.getElementById("hymc"),'会议名称'))
	     return false;
      
     if(!validateNotNull(document.getElementById("hytzZbdwz"),'主办单位中文名称'))
    	return false;
     if(!validateNotNull(document.getElementById("hytzZbdwe"),'主办单位英文名称'))
    	return false;
    // if(validateNotNull(document.getElementById("hytzHymcz"),'大屏幕第一行内容'))
    //	return false;
    // if(validateNotNull(document.getElementById("hytzHymce"),'大屏幕第二行内容'))
    //	return false;
    if(!validateNotNull(document.getElementById("hytzPort"),'播放地点'))
     	return false;
     if(!validateNotNull(document.getElementById("hytzScwjlj"),'上传文件'))
    	return false;
    // if(!validateNotNull(document.getElementById("hytzLine1"),'小屏幕第一行内容'))
    //   return false;
    //if(!validateNotNull(document.getElementById("hytzLine2"),'小屏幕第二行内容'))
   // 	return false;
   // if(!validateNotNull(document.getElementById("hytzLine3"),'小屏幕第三行内容'))
   // 	return false;
   // if(!validateNotNull(document.getElementById("hytzLine4"),'小屏幕第四行内容'))
  //  	return false;
    if(!validateNotNull(document.getElementById("hytzKssj"),'文件播放起始时间'))
    	return false;
    if(!validateNotNull(document.getElementById("hytzJssj"),'文件播放结束时间'))
    	return false;
    //if(!validateNotNull(document.getElementById("publishId"),'发布人'))
    //	return false;
    //if(!validateNotNull(document.getElementById("hytzFbsj"),'发布时间'))
    //	return false;
    if(document.getElementById("hytzKssj").value >= document.getElementById("hytzJssj").value){
       alert("文件播放结束时间不能早于或等于开始时间");
       return false;
    } 
   
    return true; 
 } 
  	function ki_cls(){
		 document.getElementById("hymc").value='';
		 document.getElementById("hytzZbdwz").value='';
		 document.getElementById("hytzZbdwe").value='';
		 document.getElementById("hytzPort").value='';
		 document.getElementById("hytzScwjlj").value='';
		 document.getElementById("hytzKssj").value='';
		 document.getElementById("hytzJssj").value='';
		 
		 
	} 
	function ki_list(){
		window.open('<%=basePath%>info.do?action=list','_self');
	}
	 function ki_inquiry(){
			    openwindow("<%=path%>/pubinfo.do?action=search",'800','600','');
			}
 function refresh(){
      /* var size = form1.fieldflag.value;
      var obj = document.getElementById('line1_remark');
       obj.innerHTML = '<br>（汉字'+form1.fieldflag.value+'以内，英文'+size*2+'以内）';
       var obj1 = document.getElementById('line2_remark');
       obj1.innerHTML = '<br>（汉字'+size+'以内，英文'+size*2+'以内）';
       var obj2 = document.getElementById('line3_remark');
       obj2.innerHTML = '<br>（汉字'+size+'以内，英文'+size*2+'以内）';
       var obj3 = document.getElementById('line4_remark');
       obj3.innerHTML = '<br>（汉字'+size+'以内，英文'+size*2+'以内）';
 */
 }
 function selectRoom(){
 	var str =  form1.placeselect.value;
 	if(''!= str){
 	  var index = str.indexOf('#');
 	  var areaId = str.substring(0,index);
 	  var type = str.substring(index+1); 
 	  if(0 == type)
 	    openwindow('<%=path%>/client.do?action=select&type=<%=type%>&area='+areaId+'&meetingId=<%=map.get("ID")%>','1024','768','_blank');
 	  if(1==type){
 	     var vv = document.getElementById(str).value;
 	     var inx = vv.indexOf('#'); 
 	     form1.fieldflag.value='15';
         form1.hytzPort.value=vv.substring(0,inx)+',';
         form1.content.value="null#";
         form1.hytzPortName.value=vv.substring(inx+1)+',';
 	  }
 	   
 	}
  
   if(form1.placeselect.value == 'hotelroom'){ ; 
       form1.fieldflag.value='15';
       form1.hytzPort.value="67,";
       form1.content.value="null#";
       form1.hytzPortName.value="LCD15,"; 
       form1.placeselect.value == 'hotelroom';
   }
         
 }
  
  function uploadfile(){
   openwindow('<%=path%>/hotel/info/upload.jsp?type=<%=type%>&fileId=<%=map.get("UPLOAD_FILE_ID")%>','500','300','_blank');
 }
</script>
<style type="text/css">
<!--
.STYLE2 {color: #FF0000}
-->
</style>
</head>

<body background="<%=imgpath%>top3.gif" leftmargin="0" topmargin="0"><br>
<form name="form1"    action=""   method="post"> 
	<center> 
	<table height="48" border="0" cellpadding="2" cellspacing="1" class="bg_table" style="width:80%" bordercolor="#111111">
	   <tr class="top_td"> 
		<td colspan="4"></td>
		<input type="hidden" name="fieldflag" value="0">
	  </tr> 
	    
  <tr class="td2">
    <td width="25%">当前发布类型</td>
     <td width="30%">
      <input type="hidden" name="hytzTag" value="<%=map.get("MEETING_PUBLISH_TYPE")==null?type:map.get("MEETING_PUBLISH_TYPE") %>">
      <%if(null == map.get("MEETING_PUBLISH_TYPE")){  
       
       out.print(StringUtil.returnInfoName1(type));
       }else{ 
          out.print(StringUtil.returnInfoName1(map.get("MEETING_PUBLISH_TYPE")+"")); 
       } %>	</td>
    <td width="20%">是否刷新</td>
    <td width="30%"><select name="isrefresh" style="width:90%;">
                      <option value=0 <%if("0".equals(isrefresh)){out.println(" checked");} %>>否</option>
                      <option value=1 <%if("1".equals(isrefresh)){out.println(" checked");} %>>是</option>
                      </select></td>
  </tr>

  <tr class="td2" id="danwei"  >
    <td width="20%">主办单位(中文)</td>
    <td width="30%"><label>
      <input type="text" name="hytzZbdwz" class="area100" check="c_y_200" style="width:90%" value="<%=StringUtil.NULL2Blank(map.get("MEETING_UNIT_CN")+"") %>"  >
    </label></td>
    <td width="20%">主办单位(英文)</td>
    <td width="30%"><label>
      <input type="text" name="hytzZbdwe"  class="area100" check="c_y_200" style="width:90%" value="<%=StringUtil.NULL2Blank(map.get("MEETING_UNIT_EN")+"") %>" >
    </label></td>
  </tr>
 <tr class="td2" >
    <td>会议主题</td>
    <td colspan="3" ><input type="text" name="hymc"  class="area100" check="c_y_200" maxlength="30" style="width:96%" value="<%=StringUtil.NULL2Blank(map.get("MEETING_NAME")+"") %>" >
    <input type="hidden" name="meetingId"  class="area100" check="c_y_200" maxlength="30" style="width:96%" value="<%=StringUtil.NULL2Blank(map.get("ID")+"") %>" ></td>
    </tr>
  <!--  <tr class="td2" id="meet"  >
    <td>大屏第一行显示<span class="STYLE2"><br>（汉字15以内，英文30以内）</span></td>
    <td colspan="3"><input type="text" name="hytzHymcz"  class="area100" check="c_y_200" maxlength="30" style="width:96%" value="<%=StringUtil.NULL2Blank(map.get("BIGSCREEN_LINE_ONE")+"") %>" ></td>
    </tr>
  <tr class="td2" id="meet1"  >
    <td>大屏第二行显示<span class="STYLE2"><br>（汉字15以内，英文30以内）</span></td>
    <td colspan="3"><input type="text" name="hytzHymce"  class="area100" check="c_y_200" maxlength="30" style="width:96%" value="<%=StringUtil.NULL2Blank(map.get("BIGSCREEN_LINE_TWO")+"") %>" ></td>
    </tr>--> 
    <tr class="td2" id="meet1"  >
    <td>选择播放地点 </td>
    <td colspan="3" >
    <input type="hidden" name="hytzPort"      　 value="<%=StringUtil.NULL2Blank(idStr) %>"  >
    <input type="text" name="hytzPortName"  class="area100"    style="width:68%"　 value="<%=StringUtil.NULL2Blank(nameStr) %>" readonly>
    <input type="hidden" name="content"        value="<%=StringUtil.NULL2Blank(contentStr) %>" >
     <%=areaStr%></td>
    </tr>
 <!--  <tr class="td2"  id="east"  >
    <td>东侧屏幕组合</td>
    <td><label>
      <input type="checkbox" name="hytzPort4"  value = "1"  >
      同时显示
    </label></td>
    <td></td>
    <td></td>
  </tr>
  <tr class="td2"  id="west"  >
    <td>西侧屏幕组合</td>
    <td><label>
      <input type="checkbox" name="hytzPort5"  value = "1" >
      同时显示
    </label></td>
    <td></td>
    <td></td>
  </tr>-->
  <tr class="td2">
    <td  width="20%">选择PPS文件</td>
    
    <td colspan="2"  width="70%"><input type="text" name="hytzScwjlj"  class="area100"   style="width:94%" value="<%=StringUtil.NULL2Blank(map.get("FILE_NAME")+"") %>"  readonly>
    <input type="hidden" name="hytzScwjljId"  class="area100"   value="<%=StringUtil.NULL2Blank(map.get("UPLOAD_FILE_ID")+"") %>" >
    <input type="hidden" name="filePath"  class="area100"   value="<%=StringUtil.NULL2Blank(map.get("FILE_PATH")+"") %>" ></td>
     <td width="10%"><label>
      <input type="button" name="choiceupload" class="area100" value="选择"   onClick="uploadfile()"> 
    </label></td>
  </tr>

  
  <tr class="td2">
   
    <td id="time2" >文件播放起始时间</td>

    <td><input type="text" name="hytzKssj" class="area100" check="c_n_200" style="width:90%" value="<%=StringUtil.dateTimeSubStr(map.get("MEETING_BEGIN_TIME")+"") %>"  onClick="changediv(this);changeshow2Sj(this);" readonly></td>
    <td id="time4" >文件播放结束时间</td>
    <td><input type="text" name="hytzJssj" class="area100" check="c_n_200" style="width:90%" value="<%=StringUtil.dateTimeSubStr(map.get("MEETING_END_TIME")+"") %>"  onClick="changediv(this);changeshow2Sj(this);" readonly></td>
  </tr>


  <tr class="td2">
    <td>发布者</td>
    <td><input type="hidden" name="publishId" value="<%if(null == map.get("MEETING_PUBLISH_ID")||"null".equals(map.get("MEETING_PUBLISH_ID")+"")){out.print(SessionUtil.getUserId(request));}
                                                       else{ out.print(StringUtil.NULL2Blank(map.get("MEETING_PUBLISH_ID")+""));}%>">
                                                       <%if(null == map.get("MEETING_PUBLISH_ID")||"null".equals(map.get("MEETING_PUBLISH_ID")+"")){out.print(SessionUtil.getUserName(request));}else{
                                                        out.print(InitSystem.getUserNameById(map.get("MEETING_PUBLISH_ID")+""));}%></td>
    <td>发布时间</td>
    <td><input type="text" name="hytzFbsj"  class="area100" check="c_n_200" style="width:90%" value="<%=StringUtil.currentTime()%>"   readonly></td>
  </tr>

  <tr class="td2" id="preview"  >
    <td colspan="4"><!-- <input type="button" name="dook" value="预览" onClick="javascript:gotopage()" class="area100"  >--></td>
  </tr> <tr class="top_td" >
			<td  colspan="4">			</td>
		  </tr>
     </table>
  </center>
</form> 

</body>
</html>

<%@ include file="/hotel/pow.jsp"%>
